package com.example.wechatdaka.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.wechatdaka.entity.UserWechat;
import com.example.wechatdaka.mapper.UserWechatMapper;
import com.example.wechatdaka.service.UserWechatService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lx
 * @since 2020-11-29
 */
@Service
public class UserWechatServiceImpl extends ServiceImpl<UserWechatMapper, UserWechat> implements UserWechatService {
    @Autowired
    private UserWechatMapper userWechatMapper;
    @Override
    public UserWechat selectByOpenId(String openId) {
        UserWechat userWechat = userWechatMapper.selectByOpenId(openId);

        return userWechat;
    }

    @Override
    public List<UserWechat> queryAllUserWechat() {
        return userWechatMapper.queryAllUserWechat();
    }
    public IPage<UserWechat> queryAllUserWechatByPage(Page page) {
        return userWechatMapper.queryAllUserWechatByPage(page);
    }

    @Override
    public List<UserWechat> queryByClazz(String id) {
        return userWechatMapper.queryByClazz(id);
    }

    @Override
    public IPage<UserWechat> queryByClazzPage(Page page, String id) {
        return userWechatMapper.queryByClazzPage(page,id);
    }

    @Override
    public UserWechat queryByUserNumber(String lxUserNumber) {
        return userWechatMapper.queryByUserNumber(lxUserNumber);
    }
}
